<foreach name="orderTimeRange" item="time">
    <tr style="height: 60px;">
        <td style="line-height: 60px;">{$time}</td>
        <foreach name="orgList" item="org">
            <td style="line-height: 60px;">
                <if condition="$userList[$defaultDate][$time][$org['id']]">
                    <assign name="apps" value="$userList[$defaultDate][$time][$org['id']]" />
                    <foreach name="apps" item="app">
                        <button class="btn btn-sm <if condition="$app['surplus'] lt $app['nums']">btn-primary<else/>btn-danger</if> m5" type="button">
                            <small thisId="{$app.id}">{$app['user']['real_name']}（{$app['surplus']}/{$app['nums']}）</small>
                            <span thisId="{$app.id}" time="{$time}">&times;</span>
                        </button>
                    </foreach>
                <else/>
                    -
                </if>
            </td>
        </foreach>
    </tr>
</foreach>